package com.zhangdi.zddemo.thread;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Controller {
    @Autowired
    TestA testA;

    @GetMapping("go")
    public String go(){
        testA.run();
        return "gogo";
    }

    @GetMapping("stop")
    public String stop(){
        testA.stop();
        return "stop";
    }

    @GetMapping("go1")
    public String go1(){
        testA.run();
        return "gogo111";
    }
}
